//
//  HomeTitleButton.swift
//  weibopush
//
//  Created by 龚欣 on 15/6/27.
//  Copyright © 2015年 gong. All rights reserved.
//

import UIKit

class HomeTitleButton: UIButton {

    override func layoutSubviews() {
        super.layoutSubviews()
        titleLabel?.frame.origin.x = 0
        imageView?.frame.origin.x = (titleLabel?.frame.width)!
    }
    
    class func button(title : String) -> HomeTitleButton{
        let btn = HomeTitleButton()
        btn.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)
        btn.setTitle(title + " ", forState: UIControlState.Normal)
        btn.setImage(UIImage(named: "navigationbar_arrow_down"), forState: UIControlState.Normal)
        btn.sizeToFit()
       return btn
    }
 
}
